import type { Component } from 'vue'
import type { Modify } from '@/types/utils'

export interface ICaseListReq {
  disabled?: string
  shared?: string
  status?: string
  pageNo?: number
  pageSize?: number
}
export interface ICaseListResp {
  pageNo: number
  pageSize: number
  totalPages: number
  totalSize: number
  data: ICaseTableItem[]
}

export interface ICaseTableItem {
  caseId: number
  name: string
  status: string
  // lastUpdateUid: string
  lastUpdateTime: string
  // creatorUid: string
  createdTime: string
  remark: string
  disabled: string
  shared: string
  resultStatus: string
  jsonArgs: string
}
export type IModifiedCaseTableItem = Modify<ICaseTableItem, {
  disabled: boolean
  shared: boolean
}>

export interface ICaseProcessItem {
  title: string
  icon: Component
  status?: 'finish' | 'error'
  update?: boolean
}

export type processStatusType = 'finish' | 'error' | 'wait'

export interface IcaseResult {
  raw_data_table: any
  raw_scatter_2d: any
  cluster_2d: any
  cluster_3d: any
  som_heatmap: any
  contribution: any
  opt_2d: any
  opt_table: any
  _run_good: boolean
}

export interface IResultRawTableItem {
  dataIndex: string
  title: string
  align: 'center'
}

export interface IHeatmapReq {
  var_name?: string
}
